The emir of Bahrain had dinner at the White House last night, and even though the gold dagger he wore against his belly was particularly impressive, the guest who got the most attention was an astronaut, Sally Ride.

"We knew about a week before the flight that we were going to come here, so we thought we'd better find out exactly where Bahrain was and if we were going to fly over it," she said. "It's very easy to pick out. We saw it every day."

The emir, Isa bin Salman Khalifa, was the guest of honor at a state dinner that featured the five astronauts of the space shuttle Challenger. The emir, who came up to the president's shoulder, liked them a lot. They gave him a picture of Bahrain they took from space; the crew "had to get up an hour early to get it," said Capt. Robert Crippen.

The president, meanwhile, could be seen deep in conversation with Sen. Paul Laxalt (R-Nev.), who will probably be chairman of his reelection campaign. Were they talking about it? Oh no, Reagan said. When might he announce? "At the last, latest possible moment it can be done," he said, smiling genially.

That was the dinner from the president's perspective. A state dinner is actually the sum of many parts: the nervous guest, the frantic White House staffer, the contented foreign minister still purring from his audience with the president of the United States. Looking at it from each of their perspectives, there was not one state dinner--but three. The Guest

Carmen Barrera was worried about wrinkling her plum silk dress, so she hand-carried it all the way from San Antonio. And one of the first things she did when she got to Washington was to have her hair done. "That is a must," she said.

She wasn't quite sure why she and her husband, Roy, a Democrat and a top criminal lawyer from Texas, were invited. But she wasn't asking any questions. "The invitation came to the house and I opened it and I called my husband and I said, 'Are you ready to leave?' and he said, 'Where are we going?' and I said, 'The White House--the president is calling.' "

In fact, the couple was invited because the White House is hoping Roy Barrera will support Reagan in the next election. Reagan needs a lot of help in the Hispanic community, where he's weak, and Barrera campaigned for former Texas Republican governor William Clements in 1980. But Barrera, who is not politically naive, said over coffee in the Red Room: "I've been around."

A chance to meet Philadelphia basketball star Moses Malone or race car driver Richard Petty, who were both there last night, won't necessarily win Barrera's support--although, he smiled, "it's not a negative."

Barrera is also defending White House Chief of Staff James Baker's son John on a marijuana charge, but Baker said yesterday he didn't know Barrera was on the guest list until an hour before the dinner.

The Barreras spent a leisurely day as Washington tourists. They had a late breakfast at the Hay-Adams, walked around downtown, then had soft-shell crabs at Maison Blanche, although Carmen Barrera carefully avoided eating their legs.

"I suppose I'll be nervous and excited," she said. "It's something you take with you to your grave."

She looked a little nervous when she arrived at the diplomatic entrance. She had been to the White House once before, during the Johnson administration, but the butterflies don't ever go away. A harpist played as she and her husband walked toward the hallway where all the reporters, gawking and scribbling, stood behind velvet ropes.

Suddenly, the military aide boomed out their names: "Mr. and Mrs. Roy Barrera!" Later, she said she felt like a star. The flashbulbs popped. She floated upstairs in her plum silk dress.

Sure enough, no wrinkles. The Press Secretary

Sheila Tate, Nancy Reagan's press secretary, began her day at 7:45 a.m. with six newspapers. She raced through them, knowing that things would start piling up when all the reporters began calling with questions about the state dinner: What would Nancy Reagan be wearing? (A black and white Galanos that was slit to her knee; last night you could see an occasional flash of leg when she danced with her husband to "Anything Goes.") Why was Roy Barrera on the guest list? When can we see the flower arrangements on the table?

State dinners became routine for Tate a long time ago, but she still gets a kick out of some of it. "I enjoy standing down there watching the guests arrive," she said. "It's kind of fun to see them come in and deal with the camera lights and the reporters."

Most state dinners go like clockwork to Tate, although one time an American and an Egyptian photographer almost had a fist fight in the State Dining Room while Reagan was delivering his toast. "It was like being a schoolteacher in a schoolyard," she said. "I can only control the Americans, so I gave him The Look. At the end of it I gave him a piece of my mind. He started to say, 'He pushed me first.' I said, 'Don't ever do that again.' "

At 4 p.m., Tate went down to the West Wing press office to see if any reporters wanted to take a look at the tables in the State Dining Room. With dead seriousness, she said, "The escort is here for reporters to preview the table settings." A gaggle of reporters broke into jaundiced applause.

Three of them went up with her and looked at the Reagan china, the little nuts in the bowls on each table, the matchbooks that said "The President's House" and the centerpieces of cattails and waterlilies.

"Okay," said Tate to a cameraman, "the emir sits here and this is Mrs. Reagan's seat." The cameraman started filming the place setting, which included three knives, three forks and four glasses.

By 6:30, Tate had changed into a red polka-dotted evening dress and was waiting with reporters behind the velvet ropes as the guests arrived. She nervously checked off each arrival on her list to see who was next. There was Sally Ride, there was Ed Meese, and there were the Barreras.

"What are cattails?" one reporter wanted to know. "I thought they were something you could eat."

"Good thing you're not invited to the dinner," said Tate.

After dinner, when Reagan was dancing with his wife, Tate kept a close watch on the reporters who were hanging around the Great Hall. She knew from experience that that was when they tended to ask the president embarrassing questions. Sure enough, they did: When would he announce he was running again? The circle around him grew.

Tate sighed. "I call this the glom," she said.

Pretty soon the president began making his way up to bed. But Crippen and Ride stopped him, and handed him a small package of candy. "These flew in space," said Ride.

"Far-out jelly beans," said Crippen.

Reagan laughed, took them, then said he'd "save them for the museum." Then he was gone, headed up for bed at 11:09.

Tate could relax; her day was over. She'd already had some champagne. The Foreign Minister

Mohamed bin Mubarak Khalifa, the foreign minister of Bahrain, was fascinated by some of the names on the guest list. Moses Malone of the Philadelphia 76ers, for instance.

"The tall fellow, yes?" he said.

He began his day with the official arrival ceremony with the emir on the South Lawn. Muggy, but so is Bahrain.

Then he met with the emir and Reagan, Vice President Bush, Secretary of State George Shultz, Secretary of Defense Caspar Weinberger and national security adviser William Clark in the Oval Office. They talked about Lebanon, the Iran-Iraq war, pressures in the Persian Gulf, and why Bahrain thinks there should be a Palestinian homeland. Bahrain has already asked for and is due to receive some F5 fighter planes from the United States, so the foreign minister said that never came up.

"We are not those people who ask for so many things," he said.

Then he had lunch with Sen. Charles Percy (R-Ill.) and others from the Foreign Relations Committee, returned to the Madison Hotel for tea, then changed into a fresh robe for dinner. In Bahrain they roast sheep at state dinners. The more they have, the more important the guest.

Last night, no sheep. Just filet of sole, chicken with oranges, brie cheese, a bibb lettuce salad, then honey ice cream bombe with chocolate almond brittle.

"Your way of eating is very social," he said. "People talk. But to us--it's just eating."

Estimated total time of the eating portion of a Bahrain state dinner, according to the foreign minister: 20 minutes.

But last night, it took more time. He was seated next to Ride and was, by his own account, captivated.

"She said they saw Bahrain very clearly from the air," he said, marveling. "She's a very intelligent lady."

Guests of President and Mrs. Reagan last night: OFFICIAL PARTY from BAHRAIN

Isa bin Sulman Khalifa, emir of Bahrain

Muhammad bin Mubarak Khalifa, minister of foreign affairs

Sayed Mahmoud Ahmed Alawi, financial adviser to the prime minister

Ali Muhammad Fakhru, minister of education

Yousuf Rahma Dosari, head of Amiri Court

Mohamed Yousuf Jalal, head of the chamber of commerce and industry

Mubarak Jassim Kanoo, member of the chamber of commerce and industry

Abdulaziz Bu'ali, ambassador, minister of foreign affairs

Wasfi H. Alnemer, ambassador

Nabil Ibrahim Qamber, director of protocol

Hassein Sabbagh, permanent representative of Bahrain to the United Nations

Ahmed Mahdi Haddad, charge d'affaires

Abdulla Shakar, consul of Bahrain, New York OTHER GUESTS

Rep. Robert E. Badham (R-Calif.) and Ann Badham

James A. Baker III, chief of staff and assistant to the president, and Susan Baker

Roy Barrera Sr., attorney, and Carmen Barrera, San Antonio

Cecil Bell and Carrie Bell, Wayzata, Minn.

The Vice President and Barbara Bush

William P. Clark, assistant to the president for national security affairs, and Joan Clark

Captain Robert L. Crippen, astronaut, space shuttle VII, and Virginia Crippen

Eunice Cole, president, American Nurses Association, and Mark H. Cole

Mary Crowley, founder, Home Interiors & Gifts, and David Crowley, Dallas

Ken Curtis and Torrie Curtis, Fresno, Calif.

Virgil Dechant, supreme knight, Knights of Columbus, and Ann Dechant

Edwin D. Dodd, chairman, Owens-Illinois Inc., and Marie Dodd

Isabel Eberstadt, author, and Frederick Eberstadt

David Evins and Marilyn Evins, New York

Col. John M. Fabian, astronaut, and Donna Fabian

Katherine Fanning, editor, Christian Science Monitor

John W. Ficklin, former maitre d', the White House, and Nancy Ficklin

Rep. Hamilton Fish Jr. (R-N.Y.) and Billy Fish

The Rev. Carney E.S. Gavin, Harvard University

Rep Lee H. Hamilton (D-Ind.) and daughter Tracy Souza

Henry Hathaway and Blanche Hathaway, Los Angeles

Capt. Frederick H. Hauck, astronaut, and Dolly Hauck

David Hayes, Los Angeles

Betty Heitman, co-chairman, Republican National Committee, and son Thomas Heitman

Sen. Henry Jackson (D-Wash.) and Helen Jackson

Byron Janis, concert pianist, and Maria Janis

Yasmin Aga Khan, New York

Anne Baxter Klee, actress

Bruce Lawrence and Miriam Cooke, Duke University

Sen. Paul Laxalt (R-Nev.) and Carol Laxalt

Gerson Leiber and Judith Leiber, New York

Jean Louis and Maggie Louis, Beverly Hills

Mario Machado, Los Angeles

Leo Marchetti, president, Fraternal Order of Police, and Eleanor Marchetti

John Mariotta, president, Welbilt Electronics, and Jennie Mariotta

Joseph Mitchell, president, Beneficial Standard Corp., and Beverly Mitchell

William Mounger and Jan Mounger, Jackson, Miss.

Edwin Meese III, counselor to the president, and Ursula Meese

Moses Malone, Philadelphia 76ers, and Alfreda Malone

John Naisbitt, author, and Patricia Naisbitt

Richard Petty, professional race car driver, and Lynda Petty, Randleman, N.C.,

Donnie Radcliffe, The Washington Post, and Robert C. Radcliffe

James Ramage and Charlotte Ramage, Atlanta

Sally K. Ride, astronaut, and Steven A. Hawley, astronaut

E. Claiborne Robins, chairman, A.H. Robins Co. Inc., and Lora Robins

Selwa Roosevelt, chief of protocol, and Archibald B. Roosevelt Jr.

Secretary of State George P. Shultz and Helena Shultz

Barbara Smith, president, Mormon Women's Relief Society, and Douglas Smith, Salt Lake City

Peter A. Sutherland, U.S. ambassador to Bahrain

Norman Thagard, astronaut, and Rex Thagard

Danny Thomas and Rose Marie Thomas

William E. Tucker Jr., chairman, Cal Tech, and Beryl Tucker

Nicholas A. Veliotes, assistant secretary of state for Near Eastern and South Asian affairs, and Patricia Veliotes

Secretary of Defense Caspar W. Weinberger

Richard J. Whalen and Joan Whalen

Berta White, American Farm Bureau Federation, and Gordon White

Tibor Zada and Suzanne Zada, Beverly Hills.